package com.ac.api.user.service;

import com.ac.api.user.entity.AcUserInfo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.base.helper.Result;
import com.ac.api.user.entity.AcUser;
import com.ac.api.user.vo.*;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author mzl
 * @since 2020-07-09
 */
public interface AcUserService extends IService<AcUser> {
    /*
    *获取当前userId
     */
    Integer getUserId();

    /**
     * 根据账号获取订单
     *
     * @param username
     * @return
     */
    AcUser findByUsername(String username );

    /**
     * 设置订单状态
     *
     * @param id
     * @param enable
     */
    @Transactional
    AcUser setEnable(Integer id, String enable);

    /**
     * 注册考生账号信息
     *
     * @param examinee
     * @return
     */
    @Transactional
    AcUser registerExamineeUser(RegisterExamineeVo examinee);

    /**
     * 注册学生账号信息
     *
     * @param student
     * @return
     */
    @Transactional
    AcUser registerStudentUser(RegisterStudentVo student);

    /**
     * 更新订单真实姓名
     *
     * @param id
     * @param realname
     * @return
     */
    @Transactional
    AcUser updateUserRealname(Integer id, String realname);

    /**
     * @param userIds
     * @return
     */
    @Transactional
    List<AcUser> deleteByUserIds(List<Integer> userIds);

}
